
public class Main {
    public static void main(String[] args) {
Complex c1=new Complex(1,2);
Complex c2=new Complex(3,4);
//加法1
        Complex result1=c1.Complexadd(c2);
        System.out.println("第一个加法:"+result1.realpart+"+"+result1.imaginpart+"i");
//加法2
        Complex result2=Complex.ComplexAdd(c1,c2);
        System.out.println("第二个加法:"+result2.realpart+"+"+result2.imaginpart+"i");
//减法
        Complex result3=Complex.ComplexSub(c1,c2);
        System.out.println("减法:"+result3.realpart+"+"+result3.imaginpart+"i");
//乘法
        Complex result4=Complex.ComplexMultiply(c1,c2);
        System.out.println("乘法:"+result4.realpart+"+"+result4.imaginpart+"i");
//除法
        Complex result5=Complex.ComplexDivide(c1,c2);
        System.out.println("除法:"+result5.realpart+"+"+result5.imaginpart+"i");
}
}